#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/7/31 12:24
# @Author  : summer
# @Email   : 610658552@qq.com
# @File    : urls.py.py
# @Software: PyCharm
# @Desc    :
from django.urls import path
from common.views import common
from common.views import account

from common.views.checkhealth import HealthCheckView
from common.views.token import TokenListCreateView, TokenRetrieveUpdateDestroyView


urlpatterns = [
    # 用户管理
    path('health/', HealthCheckView.as_view(), name='health-check'),
    path('login/', common.LoginView.as_view(), name='login'),
    path('check/token/', common.CheckToken.as_view(), name='check-token'),

    # 账户
    path("account/", account.AccountListCreateView.as_view(), name="account-list-create"),
    # 账号单条操作：GET/PUT/PATCH/DELETE /oa/account/1/
    path("account/<int:pk>/", account.AccountRetrieveUpdateDestroyView.as_view(), name="account-detail"),

    # 三方 token
    path("token/", TokenListCreateView.as_view(), name="token-list-create"),
    path("token/<int:pk>/", TokenRetrieveUpdateDestroyView.as_view(), name="token-detail"),
]
